package org.fanjr.simplify.rest;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Used to annotate the interface that needs to be registered, the
 * implementation of which will be registered to the REST after being declared
 * as springBean.<br>
 * <br>
 * <b>The registration rule:</b><br>
 * 1. This annotation can only be marked on the interface.<br>
 * 2. With spring's beanName as the root path of the mapping, because one
 * interface may have several implementation.<br>
 * 3. If there is a @Rest annotation on the implementation class, it is based on
 * the @Rest configuration.<br>
 * 
 * @author fanjr@vip.qq.com
 * @since 20191110 22:29:28
 */
@Retention(RUNTIME)
@Target(TYPE)
@RestController
@RequestMapping
@Documented
public @interface RestInterface {

}
